from pms.common.views import PostFormula
from project.utils.list import all_projects


class API(PostFormula):
    def handle(self, req):
        projects = all_projects().values('id', 'name')
        return self.success_respond({
            'list': list(projects)
        })
